﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *  
 **/

using System.Windows;
using System.Windows.Input;

namespace Peter.Common
{
   /// <summary>
   /// Common peter application commands
   /// </summary>
   public static class PeterApplicationCommands
   {
      /// <summary>
      /// Save all command. Saves all content that needs to be saved.
      /// </summary>
      public static readonly RoutedCommand SaveAll = new RoutedCommand (
         "SaveAll", typeof (Window), new InputGestureCollection {
            new KeyGesture(Key.S, ModifierKeys.Control | ModifierKeys.Shift)
         });

      /// <summary>
      /// New Project command. Shows the new project dialog.
      /// </summary>
      public static readonly RoutedCommand NewProject = new RoutedCommand (
         "NewProject", typeof (Window), new InputGestureCollection {
            new KeyGesture(Key.N, ModifierKeys.Control | ModifierKeys.Alt)
         });

      /// <summary>
      /// Open Project command. Shows the open project dialog.
      /// </summary>
      public static readonly RoutedCommand OpenProject = new RoutedCommand (
         "OpenProject", typeof (Window), new InputGestureCollection {
            new KeyGesture(Key.O, ModifierKeys.Control | ModifierKeys.Alt)
         });

      /// <summary>
      /// Find Next command. Finds the next occurrence of a string.
      /// </summary>
      public static readonly RoutedCommand FindNext = new RoutedCommand (
         "FindNext", typeof (Window), new InputGestureCollection {
            new KeyGesture(Key.F3, ModifierKeys.None)
         });

      /// <summary>
      /// Find Previous command. Finds the previous occurrence of a string.
      /// </summary>
      public static readonly RoutedCommand FindPrevious = new RoutedCommand (
         "FindPrevious", typeof (Window), new InputGestureCollection {
            new KeyGesture(Key.F3, ModifierKeys.Shift)
         });

      /// <summary>
      /// Replace command. Replaces the next occurrence of a string.
      /// </summary>
      public static readonly RoutedCommand Replace = new RoutedCommand (
         "Replace", typeof (Window));

      /// <summary>
      /// Replace all command. Replaces all occurrences of a string.
      /// </summary>
      public static readonly RoutedCommand ReplaceAll = new RoutedCommand (
         "ReplaceAll", typeof (Window));

      /// <summary>
      /// Quick Open command. Focuses on the quick open text box.
      /// </summary>
      public static readonly RoutedCommand QuickOpen = new RoutedCommand (
         "QuickOpen", typeof (Window), new InputGestureCollection {
            new KeyGesture(Key.Q, ModifierKeys.Control)
         });

      /// <summary>
      /// Goto Line command. Show the goto line input.
      /// </summary>
      public static readonly RoutedCommand GotoLine = new RoutedCommand (
         "GotoLine", typeof (Window), new InputGestureCollection {
            new KeyGesture(Key.G, ModifierKeys.Control)
         });

      /// <summary>
      /// Show tool window command. Shows a tool window.
      /// </summary>
      public static readonly RoutedCommand ShowToolWindow = new RoutedCommand (
         "ShowToolWindow", typeof (Window));

      /// <summary>
      /// Show tool window command. Shows the web browser.
      /// </summary>
      public static readonly RoutedCommand ShowWeb = new RoutedCommand (
         "ShowWeb", typeof (Window));

      /// <summary>
      /// Show options command. Shows the options window.
      /// </summary>
      public static readonly RoutedCommand ShowOptions = new RoutedCommand (
         "ShowOptions", typeof (Window));

      /// <summary>
      /// Show about dialog command. Shows the about dialog.
      /// </summary>
      public static readonly RoutedCommand ShowAbout = new RoutedCommand (
         "ShowAbout", typeof (Window));

      /// <summary>
      /// Show about dialog command. Shows the about dialog.
      /// </summary>
      public static readonly RoutedCommand OpenFile = new RoutedCommand (
         "OpenFile", typeof (Window));
   }
}
